package com.emep.changzhi.analyse.utils;


import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;

import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.XMLType;

public class SmsUtil {

    public String SubmitSms(String username,String password,String mobileNum, String content,String productNum) {
        String result = "";
        try {
            Service service = new Service();
            Call call = (Call)service.createCall();
            String soapActionURI = "http://tempuri.org/I_Order/SubmitSms";
            call.setUseSOAPAction(true);
            call.setSOAPActionURI(soapActionURI);
            call.setTargetEndpointAddress("http://115.29.52.221:24663/Service/?wsdl");
            call.setOperationName(new QName("http://tempuri.org/", "SubmitSms"));
            call.addParameter(new QName("http://tempuri.org/", "username"), XMLType.XSD_DATE, ParameterMode.IN);
            call.addParameter(new QName("http://tempuri.org/", "password"), XMLType.XSD_DATE, ParameterMode.IN);
            call.addParameter(new QName("http://tempuri.org/", "mobileNum"), XMLType.XSD_DATE, ParameterMode.IN);
            call.addParameter(new QName("http://tempuri.org/", "content"), XMLType.XSD_DATE, ParameterMode.IN);
            call.addParameter(new QName("http://tempuri.org/", "productNum"), XMLType.XSD_DATE, ParameterMode.IN);
            call.setReturnType(XMLType.XSD_STRING);
            result = (String)call.invoke(new Object[]{username,password,mobileNum,content,productNum});
        } catch (Exception var9) {
            System.err.println(var9.toString());
        }
        return result;
    }
}
